<!DOCTYPE html>
<html lang="en">
  <head>
    <title>crayon - sprite example</title>
    <meta charset="utf-8">
  </head>
  <body>
    <canvas id="my-canvas" width="200" height="200"></canvas>

    <script src="../crayon.min.js"></script>
    <script>

      // grab the canvas
      var canvas = new crayon.Canvas({ id: "my-canvas" });

      // create a sprite
      var sprite = new crayon.Sprite({
        src: 'img/html5.png', // note we are not doing any resource preloading, crayon handles all that for us
        x: 100,
        y: 100
      });

      // add sprite to canvas
      canvas.add(sprite);

      // done!

    </script>
  </body>
</html>